#pragma once
#ifndef _FOO_H_
#define _FOO_H_

#include"stdafx.h"

char* Strcat(char* str1, char* str2)
{
	int count1 = 0, count2 = 0;
	char *p1 = str1;
	while (str1&&*p1++ != '\0')
	{
		count1++;
	}
	char *p2 = str2;
	while (str2&&*p2++ != '\0')
	{
		count2++;
	}
	char *s = (char*)malloc(sizeof(char)*(count1 + count2) + 1);
	char *t = s;
	while (str1&&*str1 != '\0')
	{
		*s++ = *str1++;
	}
	while (str2&&*str2 != '\0')
	{
		*s++ = *str2++;
	}
	*s = '\0';
	return t;
}
#endif
